<?php 
if(!isset($_SESSION)) 
{ 
	session_start(); 
}
$mthang=date('Y-m-d');
$ktdate=getdate(strtotime($mthang));
if(isset($_REQUEST['months'])){
	$_REQUEST['months']=$_REQUEST['months'];
}else{
	$_REQUEST['months']=$ktdate[mon];
}
if(isset($_REQUEST['years'])){
	$_REQUEST['years']=$_REQUEST['years'];
}else{
	$_REQUEST['years']=$ktdate[year];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="../jquery-1.8.2.js" type="text/javascript"></script>
<script type="text/javascript" src="js/ajax-dynamic-content.js"></script>
<script type="text/javascript" src="js/ajax.js"></script>
<script type="text/javascript" src="js/ajax-tooltip.js"></script>
<link rel="stylesheet" href="css/ajax-tooltip.css" media="screen" type="text/css">
<link rel="stylesheet" href="css/ajax-tooltip-demo.css" media="screen" type="text/css">	
<title>Insert title here</title>
<script>
window.onload = function(){
	showsalary();
};
function showsalary(){
	var etax = document.getElementById("months");
	var m = etax.options[etax.selectedIndex].value;
	var etax1 = document.getElementById("years");
	var y = etax1.options[etax1.selectedIndex].value;
	$.ajax({url:"aj_inlich.php",data:{months:m,years:y},success:function(rs){
		$("#show").html(rs);
	}});
}
function dayclickok(ngay,vitri,style){
	var gt=document.getElementById("vday").value;
	if(gt!=""){
		$.ajax({url:"aj_addle.php",data:{tg:ngay,nd:gt,vitri:vitri,style:style},success:function(rs1){
			$("#vitri"+vitri).html(rs1);
			ajax_hideTooltip();
		}});
	}
}

function update(ngay,vitri,style,type){
	var gt=document.getElementById("vday").value;
	if(gt!=""){
		$.ajax({url:"aj_editaddle.php",data:{tg:ngay,nd:gt,type:type,vitri:vitri,style:style},success:function(rs2){
			$("#vitri"+vitri).html(rs2);
			ajax_hideTooltip();
		}});
	}
}
</script>
</head>
<body style="height:100%" >
<div style="width:100%">
	<div id="dk" width="100%" align="center">
		<table  style="padding:0 10px;" >
			<tr>
				<td width="50px">
					<select style="width:50px;height:24px;font-size:12px;" id="months" name="months" onchange="inlich()">
						<?php for($i=1;$i<=12;$i++){?>
							<option value="<?=$i?>"  
								<?php 
									if($i==$_REQUEST['months']){
										?>
										selected="selected"
										<?php 
									}
								?>
							>
								<?php echo $i?>
							</option>
						<?php }?>
					</select> 
				</td>
				<td  width="100px">
					<select style="width:100px;height:24px;font-size:12px;" id="years" name="years" onchange="inlich()">
						<?php for($j=$ktdate[year];$j>=2012;$j--){?>
							<option value="<?=$j?>" 
								<?php 
									if($j==$_REQUEST['years']){
										?>
										selected="selected"
										<?php 
									}
								?>
							>
								<?php echo $j?>
							</option>
						<?php }?>
					</select>
				</td>
			</tr>
		</table>
	</div>
	<div id="show">
		
	</div>
</div>
</body>
</html>